package cn.fuxue.hrms.common.entity;
import java.sql.Timestamp;
/**
 * @author 王文勇
 * @version 1.0
 * 审批节点实体类
 */

public class ApprovalNode {
    // 审批节点的唯一标识 ID，主键
    private int id;
    // 所属的审批流程模板 ID，外键，关联 approval_flow_template 表，用于确定该节点属于哪个审批流程模板
    private Integer flowTemplateId;
    // 流程节点名称，用于描述该审批节点在流程中的作用或名称
    private String flowNodeName;
    // 审批类型，如单人审批、多人会签等
    private String approvalType;
    // 审批人规则，定义如何确定该节点的审批人员
    private String approverRule;
    // 所需角色，指定执行该审批节点需要的用户角色
    private String roleRequired;
    // 是否激活，布尔值，标识该审批节点是否处于可用状态
    private boolean isActive;
    // 用户 ID，可能表示与该审批节点相关联的特定用户
    private Integer userId;
    // 条件表达式，用于定义审批通过或流转的条件
    private String conditionExpression;
    // 最后修改该审批节点信息的用户 ID
    private Integer modifyId;
    // 创建该审批节点的用户 ID
    private Integer createId;
    // 是否删除，布尔值，标识该审批节点是否被逻辑删除
    private boolean isDeleted;
    // 创建时间，记录该审批节点创建的日期和时间
    private Timestamp createTime;

    // 无参构造函数
    public ApprovalNode() {
    }

    // 全参构造函数
    public ApprovalNode(int id, Integer flowTemplateId, String flowNodeName, String approvalType,
                        String approverRule, String roleRequired, boolean isActive,
                        Integer userId, String conditionExpression, Integer modifyId,
                        Integer createId, boolean isDeleted, Timestamp createTime) {
        this.id = id;
        this.flowTemplateId = flowTemplateId;
        this.flowNodeName = flowNodeName;
        this.approvalType = approvalType;
        this.approverRule = approverRule;
        this.roleRequired = roleRequired;
        this.isActive = isActive;
        this.userId = userId;
        this.conditionExpression = conditionExpression;
        this.modifyId = modifyId;
        this.createId = createId;
        this.isDeleted = isDeleted;
        this.createTime = createTime;
    }

    // Getter 和 Setter 方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Integer getFlowTemplateId() {
        return flowTemplateId;
    }

    public void setFlowTemplateId(Integer flowTemplateId) {
        this.flowTemplateId = flowTemplateId;
    }

    public String getFlowNodeName() {
        return flowNodeName;
    }

    public void setFlowNodeName(String flowNodeName) {
        this.flowNodeName = flowNodeName;
    }

    public String getApprovalType() {
        return approvalType;
    }

    public void setApprovalType(String approvalType) {
        this.approvalType = approvalType;
    }

    public String getApproverRule() {
        return approverRule;
    }

    public void setApproverRule(String approverRule) {
        this.approverRule = approverRule;
    }

    public String getRoleRequired() {
        return roleRequired;
    }

    public void setRoleRequired(String roleRequired) {
        this.roleRequired = roleRequired;
    }

    public boolean isActive() {
        return isActive;
    }

    public void setActive(boolean active) {
        isActive = active;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getConditionExpression() {
        return conditionExpression;
    }

    public void setConditionExpression(String conditionExpression) {
        this.conditionExpression = conditionExpression;
    }

    public Integer getModifyId() {
        return modifyId;
    }

    public void setModifyId(Integer modifyId) {
        this.modifyId = modifyId;
    }

    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    public boolean isDeleted() {
        return isDeleted;
    }

    public void setDeleted(boolean deleted) {
        isDeleted = deleted;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "ApprovalNode{" +
                "id=" + id +
                ", flowTemplateId=" + flowTemplateId +
                ", flowNodeName='" + flowNodeName + '\'' +
                ", approvalType='" + approvalType + '\'' +
                ", approverRule='" + approverRule + '\'' +
                ", roleRequired='" + roleRequired + '\'' +
                ", isActive=" + isActive +
                ", userId=" + userId +
                ", conditionExpression='" + conditionExpression + '\'' +
                ", modifyId=" + modifyId +
                ", createId=" + createId +
                ", isDeleted=" + isDeleted +
                ", createTime=" + createTime +
                '}';
    }
}
